!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="883c11b2-0557-4f0f-8f1b-5e740018384f",t._sentryDebugIdIdentifier="sentry-dbid-883c11b2-0557-4f0f-8f1b-5e740018384f")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3699],{80278:function(){},44078:function(t,e,r){"use strict";r.d(e,{z:function(){return h}});var s=r(16677),i=r(89374),n=r(15518),u=r(39051),a=r(67699),c=r(53317),h=class extends u.l{constructor(t,e){super(),this.options=e,this.#t=t,this.#e=null,this.#r=(0,a.O)(),this.options.experimental_prefetchInRender||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(e)}#t;#s=void 0;#i=void 0;#n=void 0;#u;#a;#r;#e;#c;#h;#o;#l;#d;#f;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),o(this.#s,this.options)?this.#y():this.updateResult(),this.#R())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return l(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return l(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#v(),this.#s.removeObserver(this)}setOptions(t,e){let r=this.options,s=this.#s;if(this.options=this.#t.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,c.Nc)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#Q(),this.#s.setOptions(this.options),r._defaulted&&!(0,c.VS)(this.options,r)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let i=this.hasListeners();i&&d(this.#s,s,this.options,r)&&this.#y(),this.updateResult(e),i&&(this.#s!==s||(0,c.Nc)(this.options.enabled,this.#s)!==(0,c.Nc)(r.enabled,this.#s)||(0,c.KC)(this.options.staleTime,this.#s)!==(0,c.KC)(r.staleTime,this.#s))&&this.#m();let n=this.#g();i&&(this.#s!==s||(0,c.Nc)(this.options.enabled,this.#s)!==(0,c.Nc)(r.enabled,this.#s)||n!==this.#f)&&this.#I(n)}getOptimisticResult(t){let e=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(e,t);return(0,c.VS)(this.getCurrentResult(),r)||(this.#n=r,this.#a=this.options,this.#u=this.#s.state),r}getCurrentResult(){return this.#n}trackResult(t,e){let r={};return Object.keys(t).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),e?.(s),t[s])})}),r}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#s}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let e=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,e);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#y({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#y(t){this.#Q();let e=this.#s.fetch(this.options,t);return t?.throwOnError||(e=e.catch(c.ZT)),e}#m(){this.#b();let t=(0,c.KC)(this.options.staleTime,this.#s);if(c.sk||this.#n.isStale||!(0,c.PN)(t))return;let e=(0,c.Kp)(this.#n.dataUpdatedAt,t);this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},e+1)}#g(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#I(t){this.#v(),this.#f=t,!c.sk&&!1!==(0,c.Nc)(this.options.enabled,this.#s)&&(0,c.PN)(this.#f)&&0!==this.#f&&(this.#d=setInterval(()=>{(this.options.refetchIntervalInBackground||s.j.isFocused())&&this.#y()},this.#f))}#R(){this.#m(),this.#I(this.#g())}#b(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#v(){this.#d&&(clearInterval(this.#d),this.#d=void 0)}createResult(t,e){let r;let s=this.#s,i=this.options,u=this.#n,a=this.#u,h=this.#a,l=t!==s?t.state:this.#i,{state:p}=t,y={...p},R=!1;if(e._optimisticResults){let r=this.hasListeners(),u=!r&&o(t,e),a=r&&d(t,s,e,i);(u||a)&&(y={...y,...(0,n.z)(p.data,t.options)}),"isRestoring"===e._optimisticResults&&(y.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:Q}=y;if(e.select&&void 0!==y.data){if(u&&y.data===a?.data&&e.select===this.#c)r=this.#h;else try{this.#c=e.select,r=e.select(y.data),r=(0,c.oE)(u?.data,r,e),this.#h=r,this.#e=null}catch(t){this.#e=t}}else r=y.data;if(void 0!==e.placeholderData&&void 0===r&&"pending"===Q){let t;if(u?.isPlaceholderData&&e.placeholderData===h?.placeholderData)t=u.data;else if(t="function"==typeof e.placeholderData?e.placeholderData(this.#o?.state.data,this.#o):e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),this.#e=null}catch(t){this.#e=t}void 0!==t&&(Q="success",r=(0,c.oE)(u?.data,t,e),R=!0)}this.#e&&(b=this.#e,r=this.#h,v=Date.now(),Q="error");let m="fetching"===y.fetchStatus,g="pending"===Q,I="error"===Q,O=g&&m,C=void 0!==r;return{status:Q,fetchStatus:y.fetchStatus,isPending:g,isSuccess:"success"===Q,isError:I,isInitialLoading:O,isLoading:O,data:r,dataUpdatedAt:y.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>l.dataUpdateCount||y.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!g,isLoadingError:I&&!C,isPaused:"paused"===y.fetchStatus,isPlaceholderData:R,isRefetchError:I&&C,isStale:f(t,e),refetch:this.refetch,promise:this.#r}}updateResult(t){let e=this.#n,r=this.createResult(this.#s,this.options);if(this.#u=this.#s.state,this.#a=this.options,void 0!==this.#u.data&&(this.#o=this.#s),(0,c.VS)(r,e))return;if(this.options.experimental_prefetchInRender){let t=t=>{"error"===r.status?t.reject(r.error):void 0!==r.data&&t.resolve(r.data)},e=()=>{t(this.#r=r.promise=(0,a.O)())},s=this.#r;switch(s.status){case"pending":t(s);break;case"fulfilled":("error"===r.status||r.data!==s.value)&&e();break;case"rejected":("error"!==r.status||r.error!==s.reason)&&e()}}this.#n=r;let s={};t?.listeners!==!1&&(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;let s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&s.has(t))})()&&(s.listeners=!0),this.#O({...s,...t})}#Q(){let t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#s)return;let e=this.#s;this.#s=t,this.#i=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#R()}#O(t){i.V.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#t.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function o(t,e){return!1!==(0,c.Nc)(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===e.retryOnMount)||void 0!==t.state.data&&l(t,e,e.refetchOnMount)}function l(t,e,r){if(!1!==(0,c.Nc)(e.enabled,t)){let s="function"==typeof r?r(t):r;return"always"===s||!1!==s&&f(t,e)}return!1}function d(t,e,r,s){return(t!==e||!1===(0,c.Nc)(s.enabled,t))&&(!r.suspense||"error"!==t.state.status)&&f(t,r)}function f(t,e){return!1!==(0,c.Nc)(e.enabled,t)&&t.isStaleByTime((0,c.KC)(e.staleTime,t))}},82161:function(t,e,r){"use strict";let s;r.d(e,{r:function(){return m}});var i=r(52983),n=r(89374),u=r(53317),a=r(25288);r(97458);var c=i.createContext((s=!1,{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s})),h=()=>i.useContext(c),o=r(56139),l=(t,e)=>{(t.suspense||t.throwOnError)&&!e.isReset()&&(t.retryOnMount=!1)},d=t=>{i.useEffect(()=>{t.clearReset()},[t])},f=({result:t,errorResetBoundary:e,throwOnError:r,query:s})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(0,o.L)(r,[t.error,s]),p=i.createContext(!1),y=()=>i.useContext(p);p.Provider;var R=t=>{t.suspense&&("number"!=typeof t.staleTime&&(t.staleTime=1e3),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,1e3)))},b=(t,e)=>t.isLoading&&t.isFetching&&!e,v=(t,e)=>t?.suspense&&e.isPending,Q=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function m(t,e,r){let s=(0,a.NL)(r),c=y(),p=h(),m=s.defaultQueryOptions(t);s.getDefaultOptions().queries?._experimental_beforeQuery?.(m),m._optimisticResults=c?"isRestoring":"optimistic",R(m),l(m,p),d(p);let g=!s.getQueryState(t.queryKey),[I]=i.useState(()=>new e(s,m)),O=I.getOptimisticResult(m);if(i.useSyncExternalStore(i.useCallback(t=>{let e=c?()=>void 0:I.subscribe(n.V.batchCalls(t));return I.updateResult(),e},[I,c]),()=>I.getCurrentResult(),()=>I.getCurrentResult()),i.useEffect(()=>{I.setOptions(m,{listeners:!1})},[m,I]),v(m,O))throw Q(m,I,p);if(f({result:O,errorResetBoundary:p,throwOnError:m.throwOnError,query:s.getQueryCache().get(m.queryHash)}))throw O.error;if(s.getDefaultOptions().queries?._experimental_afterQuery?.(m,O),m.experimental_prefetchInRender&&!u.sk&&b(O,c)){let t=g?Q(m,I,p):s.getQueryCache().get(m.queryHash)?.promise;t?.catch(o.Z).finally(()=>{I.hasListeners()||I.updateResult()})}return m.notifyOnChangeProps?O:I.trackResult(O)}},78511:function(t,e,r){"use strict";r.d(e,{a:function(){return n}});var s=r(44078),i=r(82161);function n(t,e){return(0,i.r)(t,s.z,e)}},56139:function(t,e,r){"use strict";function s(t,e){return"function"==typeof t?t(...e):!!t}function i(){}r.d(e,{L:function(){return s},Z:function(){return i}})}}]);